import '../bs/build_serialize'
import './login'

let build_serialize = window.namespace.build_serialize;
let message_login = windows.namespace.message.login;

// 登陆返回
class bs_login_ack extends build_serialize.bs_message_t {

    // 登陆请求结构
    get login() {
        return this.login_.value_;
    }
    // 登陆请求结构
    set login(_vl) {
        this.login_.value_ = _vl;
    }
    // 测试基础类1
    get login_list() {
        return this.login_list_.value_;
    }
    // 测试基础类1
    set login_list(_vl) {
        this.login_list_.value_ = _vl;
    }
    // wolegequ
    get u8() {
        return this.u8_.value_;
    }
    // wolegequ
    set u8(_vl) {
        this.u8_.value_ = _vl;
    }

    constructor() {
        super();
        // 登陆请求结构
        this.login_ = new message_login.bs_account_login();
        // 测试基础类1
        this.login_list_ = new build_serialize.bs_list_ot(message_login.bs_account_login.new_helper);
        // wolegequ
        this.u8_ = new build_serialize.bs_crt_uint8();
    }

    child_length() {
        return this.login_.length() +
            this.login_list_.length() +
            this.u8_.length();
    }

    child_serialize(_stream_help) {
        return this.login_.serialize(_helper) &&
            this.login_list_.serialize(_helper) &&
            this.u8_.serialize(_helper);
    }

    child_build(_stream_help) {
        return this.login_.build(_helper) &&
            this.login_list_.build(_helper) &&
            this.u8_.build(_helper);
    }

}

window['namespace'] = window['namespace'] || {};
window['namespace']['message_ext'] = window['namespace']['message_ext'] || {};
window['namespace']['message_ext']['login_ext'] = window['namespace']['message_ext']['login_ext'] || {};

let login_ext = window['namespace']['message_ext']['login_ext'];
login_ext['bs_login_ack'] = bs_login_ack;
